import React from 'react';
import {LocaleContext} from '../locale-provider';
import {Input as ApusicInput} from 'apusic-ui';

interface InputProps {
  placeholder?: string;
  defaultValue?: string;
  value?: string;
  size?: string;
}

const { Search, Password } = ApusicInput;

Input.Search = Search;
Input.Password = Password;

export default function Input(props: InputProps) {
  const {T} = React.useContext(LocaleContext);

  return (
    // @ts-ignore
    <ApusicInput placeholder={T('input.placeholder')} {...props}/>
  );
}
